<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript">
            function f1(e) {
                //Chrome和IE8支持window.event和event
                var ev = window.event || e;
                var ele = ev.srcElement || ev.target;
                alert(ele.innerHTML);
            }
        </script>
    </head>
    <body>
        <!-- FireFox中必须传递event参数       -->
        <button onclick="f1(event);">TODO write content</button>
        <button id="bt2">TODO write content 2</button>
        <script type="text/javascript">
            var bt2 = document.getElementById("bt2");
            //FireFox需要传递参数e
            bt2.onclick = function(e){
                var ev = window.event || e;
                var ele = ev.srcElement || ev.target;
                alert(ele.innerHTML);
            };
        </script>
    </body>
</html>
